package labox.innovation.gameserver.skills.conditions;

import labox.innovation.gameserver.skills.Env;

/**
 * @author mkizub
 * 
 */
public final class ConditionItemId extends Condition {

	private final int _itemId;

	public ConditionItemId(int itemId) {
		_itemId = itemId;
	}

	/**
	 * 
	 * @see labox.innovation.gameserver.skills.conditions.Condition#testImpl(labox.innovation.gameserver.skills.Env)
	 */
	@Override
	public boolean testImpl(Env env) {
		if (env.item == null)
			return false;
		return env.item.getItemId() == _itemId;
	}
}
